//
//  CJUtil.h
//  NtoccShipper
//
//  Created by zcj on 2018/4/4.
//  Copyright © 2018年 zhuchongjin All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CJUtil : NSObject


+ (CGFloat)getWidthWithTitle:(NSString *)title font:(UIFont *)font;


/**
 @param image <#image description#>
 @param reSize <#reSize description#>
 @return <#return value description#>
 */
+ (UIImage *)reSizeImage:(UIImage *)image toSize:(CGSize)reSize;
/**
 图片切圆角

 @param imageV <#imageV description#>
 */
+ (void)getImageViewCutRound:(UIImageView *)imageV;

/**
 按钮切角

 @param sender <#sender description#>
 @param height <#height description#>
 */
+ (void)getUIButtonCutAllCornRound:(UIButton *)sender height:(CGFloat )height;

/**
 坐上下

 @param sender <#sender description#>
 @param height <#height description#>
 */
+ (void)getUIBUttonCutTopLeftAndBottomLeft:(UIButton *)sender height:(CGFloat )height;

+ (void)getUIButtonCutTopLeftAndBottomLeft:(UIButton *)sender height:(CGFloat )height;
+ (void)getUIButtonCutTopRightAndBottomRight:(UIButton *)sender height:(CGFloat )height;
/**
 图片切角

 @param sender <#sender description#>
 @param height <#height description#>
 */
+ (void)getUIImageVCutAllCornRound:(UIImageView *)sender height:(CGFloat )height;

/**
 <#Description#>

 @param sender <#sender description#>
 @param height <#height description#>
 */
+ (void)getUILabelCutAllCornRound:(UILabel *)sender height:(CGFloat )height;

/**
 uilabel  左上左下 切角

 @param sender <#sender description#>
 @param height <#height description#>
 */
+ (void)getUILabelCutTopLeftAndBottomLeft:(UILabel *)sender height:(CGFloat )height;


/**
  uilabel  右上右下 切角

 @param sender <#sender description#>
 @param height <#height description#>
 */
+ (void)getUILabelCutTopRightAndBottomRight:(UILabel *)sender height:(CGFloat )height;
/**
 view 切圆角

 @param sender <#sender description#>
 @param height <#height description#>
 */
+ (void)getViewCutAllCornRound:(UIView *)sender height:(CGFloat )height;

/**
 给UITextField设置右侧的文字

 @param textField <#textField description#>
 @param str <#str description#>
 @param width <#width description#>
 @param height <#height description#>
 */
+(void)getRightTextWithTextField:(UITextField *)textField textStr:(NSString *)str labelWidth:(CGFloat )width labbelHeight:(CGFloat )height;

/**
 给UITextField设置左侧的文字

 @param textField <#textField description#>
 @param str <#str description#>
 @param width <#width description#>
 @param height <#height description#>
 */
+(void)getLeftTextWithTextField:(UITextField *)textField textStr:(NSString *)str labelWidth:(CGFloat )width labelHeight:(CGFloat )height;

/**
 左侧 提示 课自设置大小
 
 @param textField <#textField description#>
 @param str <#str description#>
 @param height <#height description#>
 @param font <#font description#>
 */
+(void)getLeftTextWithTextField:(UITextField *)textField textStr:(NSString *)str  labelHeight:(CGFloat )height font:(UIFont *)font;
/**
  给UITextField设置左侧的文字  右侧文字

 @param textField <#textField description#>
 @param str <#str description#>
 @param Lwidth <#Lwidth description#>
 @param Lheight <#Lheight description#>
 @param str1 <#str1 description#>
 @param Rwidth <#Rwidth description#>
 @param Rheight <#Rheight description#>
 */
+(void)getLeftAndRightTextWithTextField:(UITextField *)textField textLeftStr:(NSString *)str labelLW:(CGFloat )Lwidth labelLH:(CGFloat )Lheight textLeftStr:(NSString *)str1 labelRW:(CGFloat )Rwidth labelRH:(CGFloat )Rheight;



+ (NSString *)replaceStringWithAsterisk:(NSString *)originalStr startLocation:(NSInteger)startLocation lenght:(NSInteger)lenght;



//+ (UIButton *)buttonWithFrame:(CGRect)frame title:(NSString *)title titleColor:(UIColor *)titleColor backgroundColor:(UIColor *)backgroundColor  titleFont:(UIFont *)titleFont cornerRadius:(float)cornerRadius Target:(id)target action:(SEL)action;

//+ (UIView *)viewWithFrame:(CGRect)frame backgroundColor:(UIColor *)backgroundColor  cornerRadius:(float)cornerRadius;

//+ (UIImageView *)imageViewWithFrame:(CGRect)frame backgroundColor:(UIColor *)backgroundColor borderColor:(UIColor *)borderColor cornerRadius:(float)cornerRadius image:(UIImage *)image contentMode:(NSNumber *)contentMode;

//+ (UITableView *)tableViewFrame:(CGRect)frame style:(UITableViewStyle)style backgroundColor:(UIColor *)backgroundColor separatorStyle:(UITableViewCellSeparatorStyle)separatorStyle dataSource:(id <UITableViewDataSource>)dataSource delegate:(id <UITableViewDelegate>)delegate;

//+ (UITextField *)textFieldWithFrame:(CGRect)frame placeholder:(NSString *)placeholder backgroundColor:(UIColor *)backgroundColor borderColor:(UIColor *)borderColor cornerRadius:(float)cornerRadius font:(UIFont *)font textColor:(UIColor *)textColor textAlignment:(NSTextAlignment)textAlignment text:(NSString *)text delegate:(id<UITextFieldDelegate>)delegate;

// 实现图文混排的方法
+ (NSAttributedString *) creatAttrStringWithText:(NSString *) text image:(UIImage *) image;

@end
